package com.eamois.controll;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;

import javax.swing.JPanel;

public class PrsPanel extends JPanel {

	 BorderLayout borderLayout1 = new BorderLayout();

	  public PrsPanel() {
	    try {
	      jbInit();
	    }
	    catch (Exception ex) {
	      ex.printStackTrace();
	    }
	  }

	  void jbInit() throws Exception {
	    this.setLayout(borderLayout1);
	  }

	  public void setActiveWnd(Component comp) {
	    Container ctn = this.getTopLevelAncestor();
	    if (ctn instanceof PrsDialog) {
	      PrsDialog dlg = (PrsDialog) ctn;
	      dlg.setActiveWnd(comp);
	    }
	    else if (ctn instanceof PrsFrame) {
	      PrsFrame frm = (PrsFrame) ctn;
	      frm.setActiveWnd(comp);
	    }
	  }
}
